/**
 * Created by hezhijie on 2016/11/22.
 */
var detectLogListModule = angular.module("detectLogList",[]);
detectLogListModule.controller("detectLogListCtrl", ['$scope',
    function ($scope) {
        $scope.init=function(){

            setTimeout(function() {
                $("#queryPeriod").datetimepicker({
                    language: "zh-CN",
                    autoclose: true,
                    todayHighlight: true,
                    minView: "year",
                    startView: "year",
                    format: "yyyy-mm"
                })
            },5);
            $scope.queryParams={
                machineCode:$scope.$stateParams.machineCode,
                queryPeriod:$scope.$stateParams.queryPeriod,
                pageNum:1,
                pageSize:20
            }
            $scope.queryDetectLogList();
        }

        $scope.queryDetectLogList=function(){
            $post(basePath+"/rest/detect/_queryDetectLog",$scope.queryParams,function(result){
                $scope.resultValue=result.resultValue;
                $scope.$apply();
            })
        }

        $scope.init();
    }
]);
